<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>首页</title>
    <link rel="stylesheet" href="../font-awesome-4.7.0/css/font-awesome.min.css">
    <script src="../js/vue.js"></script>
    <script src="../js/httpVueLoader.js"></script>
    <!-- 引入样式 -->
    <link rel="stylesheet" href="../plugins/elementui/index.css">
    <!-- 引入组件库 -->
    <script src="../plugins/elementui/index.js"></script>

    <script src="../js/echarts.js"></script>

    <script src="../js/axios-0.18.0.js"></script>
    <script src="../js/vue-router.js"></script>
</head>

<body>
    <div id="app">

    </div>
    <script>
        // 在 vue 中启用路由
        // Vue.use(VueRouter);

        var index = httpVueLoader("../vues/index.vue");
        var left_menu = httpVueLoader("../vues/left-menu-plus.vue");
        var header = httpVueLoader("../vues/header.vue");
        Vue.component("leftmenu", left_menu);
        Vue.component("headerinfo", header);

        var data_modules = httpVueLoader("../vues/data-modules.vue");
        Vue.component("data-modules", data_modules);

        var todothings = httpVueLoader("../vues/todothings.vue");
        Vue.component("todo-things", todothings);

        var goodscount = httpVueLoader("../vues/goods-count.vue");
        Vue.component("goods-count", goodscount);

        var weather = httpVueLoader("../vues/weather.vue");
        Vue.component("weather", weather);
        // 将外部加载的 vue 注册为 vue 的组件。

        var pieTable = httpVueLoader("../vues/pieTable.vue");
        Vue.component("pie-table", pieTable);

        var spgl = httpVueLoader("../vues/spgl.vue");
        Vue.component("spgl", spgl);

        // const router = new VueRouter({
        //     // 声明路由表
        //     routes: [
        //         { path: "/index", component: index },
        //         { path: "/spgl", component: spgl },
        //     ]
        // });


        new Vue({
            // router: router,
            render: (h) => h(index)
        }).$mount("#app");
    </script>
</body>

</html>